programming4us
           
 
 
SQL Server

An OLAP Requirements Example: CompSales International (part 10)

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
12/15/2010 9:00:26 AM
Delivering Data to Users

SSAS provides a great deal of flexibility for building scalable OLAP solutions, but how do you present the data to users? The client-side components deliver much of the functionality of SSAS, using the same code base for the dimensional calculation engine, caching, and query processing. You can use the Pivot Table Service to manage client/server connections, and this is the layer for user interfaces to access SSAS cubes through the OLE DB for OLAP interface. ADO MD provides an application-level programming interface for development of OLAP applications. Third-party tools and future versions of Microsoft Excel (like 2007 and 2010) and other Microsoft Office products will use the Pivot Table Service to access cubes.

The underlying Pivot Table Service shares metadata with SSAS, so a request for data on the client causes data and metadata to be downloaded to the client. The Pivot Table Service determines whether requests need to be sent to the server or can be satisfied at the client with downloaded data. If a user requests sales information for the first quarter of 2008 and then later decides to query that data for the first quarter of 2007 for comparison, only the request for 2007 data has to go to the server to get more data. The 2008 data is cached on the client.

Slices of data that are retrieved to the client computer can also be saved locally for analysis when the client computer is disconnected from the network. Users can download the data in which they are interested and analyze it offline. The Pivot Table Service can also create simple OLAP databases by accessing OLE DB–compliant data sources.

With the ADO MD interface, developers will be able to access and manipulate objects in an SSAS database, enabling web-based OLAP application development.

Many independent software vendors, such as Brio, Cognos, Business Objects, Micro Strategies, and Hyperion, are working with Microsoft to leverage the rich features of these OLAP services. They offer robust user interfaces that can access SSAS’s cubes. Versions of Microsoft Office include the Pivot Table Service to enable built-in analysis in tools such as Excel. It is getting easier and easier to bring OLAP to the masses.

Multidimensional Expressions

The OLE DB for OLAP specification contains MDX syntax that is used to build datasets from cubes and is used to define cubes themselves. Developers of OLE DB OLAP providers can map MDX syntax to SQL statements or native query languages of other OLAP servers, depending on the storage techniques.

MDX statements build datasets by using information about cubes from which the data will be read. This includes the number of axes to include, the dimensions on each axis and the level of nesting, the members or member tuples and sort order of each dimension, and the dimension members used to filter, or slice, the data. (Tuples are combinations of dimensions such as time and product time that present multidimensional data in a two-dimensional dataset.)

An MDX statement has four basic parts:

  • Member scope information, using the WITH MEMBER clause

  • Dimension, measure, and axis information in the SELECT clause

  • The source cube in the FROM clause

  • Dimension slicing in the WHERE clause

Expressions in an MDX statement operate on numbers, strings, members, tuples, and sets. Numbers and strings mean the same thing here as they do in other programming contexts. Members are the values in a dimension, and levels are groups of members. Sets are collections of tuple elements to further combine facts. If the dimension were time, a particular year, quarter, or month would be a member, and month values would belong to the month level. You use the dimension browser in SSAS to view members of a dimension.

The following example shows an MDX SQL expression:

WITH MEMBER [Measures].[Total Sales Units]
AS 'Sum([Measures].[Sales Units])'
SELECT
{[Measures].[Total Sales Units]} ON COLUMNS,
{Topcount([Product_Dimension].[SKU].members,100,
[Measures].[Total Sales Units])}
ON ROWS
FROM [Comp Sales]
WHERE ([Time_Dimension].[All Time])

You can download this simple query against the Comp Sales cube from Sams Publishing at www.samspublishing.com, and it is on the CD for this book as well. This query returns the sums of the sales units for products for all time periods. Figure 45 shows the full execution of this query within a query window of SSMS. Notice that the metadata for the cube is also made available in the center pane of SSMS, along with an MDX Functions tab that provides all the MDX functions that can be used. This feature is very helpful for building valid MDS queries within this environment. Also notice that the result set display area is very specialized in order to display multidimensional results.

Figure 45. Comp Sales MDX query execution in SSMS.


This simple MDX statement shows the basic parts of a working query. In this case, measures are displayed in columns, and the product dimension members make up the axes of this multidimensional query and are displayed in rows. The display of multiple dimensions in rows like this is how the term tuple is used in the context of SSAS.

ADO MD

ADO MD is an easy-to-use access method for dimensional data via an OLE DB for OLAP provider. You can use ADO MD in Visual Basic, Visual C++, and Visual J++. Like ADO, ADO MD offers a rich application development environment that can be used for multitier client/server and web application development.

You can retrieve information about a cube, or metadata, and execute MDX statements by using ADO MD to create cellsets to return interesting data to a user. ADO MD is another subject too broad to cover in detail in this article. Specifications for OLE DB for OLAP and ADO MD are available on the Microsoft website at http://msdn2.microsoft.com/en-us/library/ms126037.aspx.

Other -----------------
- SQL Server 2008 Analysis Services : An Analytics Design Methodology
- SQL Azure : Other Considerations
- SQL Azure : Sample Design - Application SLA Monitoring
- SQL Azure : Combining Patterns
- SQL Server 2008 Analysis Services : Understanding the SSAS Environment Wizards (part 2)
- SQL Server 2008 Analysis Services : Understanding the SSAS Environment Wizards (part 1)
- SQL Server 2008 Analysis Services : Understanding SSAS and OLAP
- SQL Azure : Design Patterns (part 3)
- SQL Azure : Design Patterns (part 2) - Sharding
- SQL Azure : Design Patterns (part 1)
- SQL Azure : Design Factors (part 2)
- SQL Azure : Design Factors (part 1)
- Limitations in SQL Azure
- SQL Server 2008 : Performance Data Collection (part 2)
- SQL Server 2008 : Performance Data Collection (part 1)
- SQL Server 2008 : Performance Tuning - Partitioning
- SQL Server 2008 : Guide to the DYNAMIC Management Views (DMVs)
- SQL Server 2008 : Managing Security - Service Accounts and Permissions
- SQL Server 2008 : Managing Security - Security and SQL Agent
- SQL Server 2008 : Implementing Transactions - Transaction Traps
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us